import { useNavigate, useLocation, useParams, 
    useSearchParams } from 'react-router-dom'
// 自定义hooks函数
export const useRouterHook = () => {
    const navigate = useNavigate()
    const location = useLocation()
    const params = useParams()
    const [searchParams] = useSearchParams()
    return {
        navigate, location, params, searchParams
    }
}